import request from '@/utils/request'

let baseMapping = "/aliyun-service/";

export default {

  //上传照片
  uploadImage(file) {
    return request({
      url: baseMapping + `uploadImage`,
      method: 'post',
      data: file
    })
  },

  //上传视频
  uploadVideo(file) {
    return request({
      url: baseMapping + `uploadVideo`,
      method: 'post',
      data: file
    })
  },

  //删除阿里云中的视频
  deleteVideo(id) {
    return request({
      url: baseMapping + `delete/${id}`,
      method: 'get'
    })
  },

  //批量删除视频
  deleteBatch(videoIdList) {
    return request({
      url: baseMapping + `delete-batch`,
      method: 'delete',
      param: videoIdList
    })
  },

  //发送验证码
  sendCode(phone) {
    return request({
      url: baseMapping + `sendCode/${phone}`,
      method: 'get'
    })
  },

  //校验验证码
  checkCode(phone, code) {
    return request({
      url: baseMapping + `checkCode/${phone}/${code}`,
      method: 'get'
    })
  },
}
